/**
 * CSS for the desktop and mobile Side menu, Product page menu
 */

/* Side menu */

.top-menu-popup {
    background-color: var(--stroke-main);
    box-shadow: 0 0 0 1px var(--stroke-grey-2);
    box-sizing: border-box;
    font-size: 0;
    height: 100%;
    line-height: 0;
    opacity: 1;
    position: fixed;
    right: 0;
    top: 0;
    transition: right 200ms ease-in-out, left 200ms ease-in-out, width 200ms ease-in-out, opacity 200ms ease-in-out;
    width: 256px;
    z-index: 1108;
}

.top-menu-popup.o-hidden {
    right: -257px;
}

.rtl.top-menu-popup {
    left: 0;
    right: auto;
}

.rtl.top-menu-popup.hidden {
    left: -257px;
}

.top-menu-scroll {
    height: calc(100% - 42px);
    margin-top: 42px;
    position: relative;
}

.top-menu-content {
    padding: 0 20px 20px;
}

/* Side menu items */

.top-menu-item {
    align-items: center;
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--text-color-high);
    cursor: pointer;
    display: inline-flex;
    margin: 10px 0;
    position: relative;
    transition: var(--transition-color), var(--transition-bg-color);
    width: 100%;
}

.top-menu-item span {
    flex-grow: 1;
    font: var(--text-h3-bold);
    padding: 4px 0;
}

.top-menu-item.small-font span {
    font: var(--text-body1-bold);
}

.top-menu-item.underlined {
    margin-bottom: 0;
}

.top-menu-item.underlined span {
    font: var(--text-body1);
    text-decoration: underline;
}

/* Side menu item icons */

.top-menu-popup i {
    --icon-size: 24px;
    --mask-color: var(--icon-active);
    display: inline-block;
}

.top-menu-item i {
    margin: 4px;
    margin-inline-end: 14px;
}

.top-menu-item span ~ i {
    --icon-size: 16px;
    --mask-color: var(--icon-active);
    margin: 0 4px;
    margin-inline-start: 0;
}

.top-menu-item.underlined i {
    margin-inline-end: 4px;
}

.top-menu-item i.x32 {
    --icon-size: 32px;
    margin: 0 2px;
    margin-inline-end: 8px;
}

.top-menu-item i.right-arrow.down,
.expanded.top-menu-item i.right-arrow {
    transform: rotate(90deg);
}

.top-menu-popup i.close {
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1;
}

.rtl .top-menu-popup i.close {
    left: 12px;
    right: auto;
}

.top-menu-divider {
    display: inline-flex;
    height: 1px;
    background-color: var(--stroke-grey-2);
    margin: 10px 0;
    width: 100%;
}

/* Side menu single item with small margin */

.top-menu-item.single {
    margin: 2px 0;
}

.top-menu-item.single span {
    flex-grow: 0;
    padding-inline-end: 14px;
}

/* Side menu Submenu and items */

.top-submenu {
    max-height: 0;
    min-height: 0;
    overflow: hidden;
    transition: max-height 200ms ease-in-out, opacity 200ms ease-in-out, padding 200ms ease-in-out;
    opacity: 0;
    margin: 0;
    z-index: 1;
}

.submenu-item.expanded + .top-submenu {
    max-height: 520px;
    opacity: 1;
}

.top-submenu .top-menu-item {
    font: var(--text-body1);
    color: var(--text-color-medium);
    padding: 6px 10px;
    padding-inline-start: 42px;
    margin: 0;
}

 .top-submenu .top-menu-item.active {
    color: var(--text-color-high);
    background-color: var(--button-hover);
}

.fm-products-nav .pages-menu.body {
    margin-top: 0;
    background-color: var(--stroke-main);
    border-top: 1px solid var(--stroke-grey-2);
    min-width: 100%;
    z-index: 140;
}

/* Side menu Hover stattes for desktop client */

@media (hover: hover) {

    .top-menu-item.small:hover span {
        text-decoration: none;
    }

    .top-submenu .top-menu-item:hover {
        color: var(--text-color-high);
        background-color: var(--button-hover);
    }

}

/* Side menu Social networks block */

.top-social-bl {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 6px 6px 0;
}

.top-social-txt {
    font: var(--text-body1-bold);
    color: var(--text-color-high);
    padding-bottom: 20px;
    width: 100%;
}

.top-social-button {
    cursor: pointer;
    display: inline-block;
    border-radius: 4px;
    background-color: #F4F4F5;
    display: block;
}

.top-social-button i {
    height: 24px;
    width: 24px;
}

/* Side menu footer */

.top-menu-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 24px 6px 6px;
}

.top-menu-footer .logout {
    flex-shrink: 0;
}

.block-null-spinner,
.top-mega-version {
    font: var(--text-body1-bold);
    color: var(--text-color-low);
    cursor: pointer;
}

.block-null-spinner {
    flex: 0 0 auto;
    margin-inline-end: 6px;
    white-space: nowrap;
}
.block-null-spinner.block-loading-spinner {
    margin: 0 6px;
    margin-inline-end: 12px;
}
/* Side menu Account data block (logged in) */

.top-menu-account-info {
    align-items: center;
    display: flex;
}
.top-menu-logged .avatar-block {
    flex-grow: 0;
    margin: 0 6px;
    position: relative;
    cursor: pointer;
}

.top-menu-logged .activity-status-block {
    position: absolute;
    right: -2px;
    top: -2px;
    margin: 0;
}

/* Unhide when all avatars have  RTL support */

/*
.rtl .top-menu-popup .top-menu-logged .activity-status-block {
    left: 0;
    right: auto;
}
*/

/* Hide presence status if avatar isn't loaded */
.top-menu-logged .hidden + .activity-status-block {
    display: none;
}

.top-menu-logged .user-info {
    cursor: pointer;
    line-height: 18px;
    overflow: hidden;
    padding: 0 6px;
    white-space: nowrap;
}

.top-menu-logged .user-info .name {
    color: var(--text-color-higher);
    font: var(--text-h3);
    font-family: var(--text-font-family);
    font-weight: bold;
    line-height: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-menu-logged .user-info .email {
    color: var(--text-color-medium);
    font: var(--text-body1);
    line-height: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-menu-logged .plan {
    font: var(--text-body1);
    color: var(--text-color-high);
    padding: 24px 6px 2px;
}

.top-menu-logged .storage {
    height: 6px;
    border-radius: 3px;
    background: var(--progress-bar-background);
    margin: 0  6px 6px;
    position: relative;
}

.top-menu-logged .loader.loading + .storage-txt {
    visibility: hidden;
}

.top-menu-logged .storage-txt {
    box-sizing:  border-box;
    color: var(--text-color-high);
    font: var(--text-body2);
    min-height: 30px;
    padding: 0 6px 12px;
    position: relative;
}

.top-menu-logged .storage-txt span {
    color: var(--text-color-success);
    font-family: var(--text-font-family);
    font-weight: 600;
}

.top-menu-logged .storage span {
    background: var(--stroke-success);
    border-radius: inherit;
    display: block;
    height: 6px;
    max-width: 100%;
    position: absolute;
    vertical-align: top;
}

.top-menu-logged.going-out .storage span {
    background: var(--surface-warning);
}

.top-menu-logged.going-out .storage-txt span {
    color: var(--text-color-warning);
}

.top-menu-logged.exceeded .storage span {
    background: var(--surface-error);
}

.top-menu-logged.exceeded .storage-txt span {
    color: var(--text-color-error);
}

.top-menu-logged button {
    margin: 0 6px 6px;
}

.top-menu-logged .loader {
    height: 16px;
    margin: 0 6px;
    opacity: 0;
    position: absolute;
    width: 16px;
}

.top-menu-logged .loader.loading {
    -webkit-animation: rotate 2.5s infinite linear;
    animation: rotate 2.5s infinite linear;
    opacity: 1;
}

/* Pages menu */

.pages-menu.body {
    width: 100%;
    position: absolute;
    margin-top: 48px;
    box-sizing: border-box;
    font-size: 0;
    line-height: 0;
    text-align: center;
    white-space: nowrap;
    z-index: 190;
    background-color: var(--stroke-main);
    -webkit-transition: top 600ms ease-in-out;
    transition: top 600ms ease-in-out;
}
.menu-shadow .pages-menu.body {
    box-shadow: 0 14px 20px 0 rgba(0, 0, 0, 0.04);
}
.download .pages-menu.body {
    bottom: 0;
}
.pages-menu.body.floating,
.download .pages-menu.body {
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1);
}
.pages-menu.body.floating {
    position: fixed;
    top: -126px;
    bottom: auto;
    z-index: 190;
}
.pages-menu.body.floating.activated {
    top: 0;
}
.pages-menu.content {
    padding: 0 0 0 0;
}
.rtl .pages-menu.content {
    direction: rtl;
}
.pages-menu.link:not(.hidden) {
    align-items: center;
    display: inline-flex;
    cursor: pointer;
    justify-content: center;
    padding: 10px 24px;
    margin: 12px 0;
}
.pages-menu.link span {
    font-size: 18px;
    line-height: 24px;
    font-family: var(--text-font-family);
    font-weight: 600;
    color: var(--text-color-high);
    display: inline-block;
    padding: 0 30px;
    transition: color 200ms ease-in-out;
}
.pages-menu.link i {
    margin-top: 2px;
    margin-inline-start: -30px;
    margin-inline-end: 0;
    display: none;
    transition: transform 200ms ease-in-out;
    --mask-color: var(--text-color-higher);
}
.pages-menu.link.active i {
    transform: rotate(-180deg);
}
.pages-menu.submenu-item  i {
    display: inline-block;
    --icon-size: 24px;
    --mask-color: var(--icon-active);
}
.pages-menu.submenu {
    border-radius: 8px;
    background-color: var(--stroke-main);
    position: absolute;
    box-shadow: var(--dropdown-shadow);
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: opacity 200ms ease-in-out;
    z-index: 10;
    white-space: nowrap;
}
.pages-menu.submenu.active {
    height: auto;
    opacity: 1;
    overflow: visible;
    padding: 5px 0;
    margin: 10px;
}
.pages-menu.submenu .half-sized {
    float: none;
    display: inline-block;
    vertical-align: top;
    width: auto;
}
.pages-menu.submenu-link {
    display: block;
    position: relative;
    text-align: left;
    margin: 22px 20px;
    min-width: 170px;
}
.pages-menu.submenu-link i {
    width: 32px;
    height: 32px;
    border-radius: 100%;
    position: absolute;
    background-color: grey;
    left: 0;
    top: 0;
}
.rtl .pages-menu.submenu-link i {
    right: 0;
    left: auto;
}
.pages-menu.submenu-link span {
    display: block;
    padding-top: 4px;
    padding-bottom: 3px;
    padding-inline-start: 45px;
    padding-inline-end: 0;
    font-family: var(--text-font-family);
    font-size: 18px;
    line-height: 24px;
    color: var(--text-color-high);
    text-align: start;
}
.menus-sprite.rounded.sync {
    background-color: #00A8E1;
    background-position: 5px -97px;
}
.menus-sprite.rounded.mobile {
    background-color: #00C1A5;
    background-position: -45px -97px;
}
.menus-sprite.rounded.uwp {
    background-color: #ED5564;
    background-position: -95px -97px;
}
.menus-sprite.rounded.cmd {
    background-color: #AB58F5;
    background-position: -145px -98px;
}
.menus-sprite.rounded.bird {
    background-color: #AB58F5;
    background-position: -45px -148px;
}
.menus-sprite.rounded.ext {
    background-color: #FFA700;
    background-position: 6px -149px;
}
.menus-sprite.rounded.nas {
    background-color: #00A8E1;
    background-position: -95px -148px;
}
.menus-sprite.rounded.storage {
    background-color: #00C1A5;
    background-position: -145px -148px;
}
.menus-sprite.rounded.encryption {
    background-color: #7A8B9A;
    background-position: -195px -148px;
}
.menus-sprite.rounded.securechat {
    background-color: #ED5564;
    background-position: 6px -197px;
}
.menus-sprite.rounded.backup {
    background-color: rgba(29, 176, 123, 1);
    background-position: -45px -199px;
}
.menus-sprite.rounded.share {
    background-color: #FFA700;
    background-position: -95px -198px;
}
.menus-sprite.rounded.objectstorage {
    background-color: #4A90E2;
    background-position: -191px -197px;
}

/* Business account */
.top-menu-logged.business-acc .storage {
    display: none;
}

/*menus-sprite */
.menus-sprite, i.menus-sprite {
    background-image: url(../images/mega/menus-sprite.png);
    background-repeat: no-repeat;
}
@media only screen and (max-width: 1240px) {
    .fr .pages-menu.link span {
        font-size: 15px;
        padding: 0 25px;
    }
}
@media only screen and (max-width: 970px) {
    .pages-menu.link span {
        padding: 0 15px;
    }
    .pages-menu.link:not(.hidden) {
        padding: 10px 8px;
    }
    .pages-menu.link i {
        margin-left: -15px;
    }
    .fr .pages-menu.link span {
        padding: 0 20px;
    }
}
@media only screen and (max-width: 780px) {
    .fr .pages-menu.link span {
        font-size: 14px;
        padding: 0 5px;
    }
    .fr .pages-menu.link.submenu-item span {
        padding: 0 15px 0 5px;
    }
}
@media only screen and (max-width: 702px) {
    .pages-menu.link span {
        min-width: 0;
        font-size: 14px;
    }
}
@media only screen and (max-width: 625px) {
    .pages-menu.body {
        display: none;
    }
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
    /*menus-sprite */
    .menus-sprite,
    i.menus-sprite
    {
        background-image: url(../images/mega/menus-sprite@2x.png);
        background-size: 223px auto;
    }
}
